//用于跟踪正式环境js错误报告，
export default function retcode() {
    if (!!global.envPrefix) return;
    // const retcode = function (c, b, d, a) {
    //     c[a] || (c[a] = {});
    //     c[a].config = {
    //         pid: "jcv3txn6c9@ac14ce66f988b6b",
    //         appType: "web",
    //         imgUrl: "https://arms-retcode.aliyuncs.com/r.png?",
    //         sendResource: true
    //     };
    //     const body = b.body;
    //     const script = body.insertBefore(b.createElement("script"), body.firstChild);
    //     script.setAttribute("crossorigin", "", (script.src = d));
    // };
    // retcode(window, document, "https://retcode.alicdn.com/retcode/bl.js", "__bl");
    
    const insertScript = function () {
        const script = document.body.insertBefore(document.createElement("script"), document.body.firstChild);
        script.setAttribute("crossorigin", "", (script.src = "https://hm.baidu.com/hm.js?67d0b0a552dbe15bb9c7df5cff4aa96c"));
        // window.onload = function () {
        //     var hm = document.createElement("script");
        //     hm.src = "https://hm.baidu.com/hm.js?67d0b0a552dbe15bb9c7df5cff4aa96c";
        //     var s = document.getElementsByTagName("script")[0]; 
        //     s.parentNode.insertBefore(hm, s);
        // };
    }
    insertScript();
}
